let portalData='';
$.ajax({
  url:'/getPortalData',
  type:'post',
  dataType:'json',
  success:(data)=>{
    let arr=[];
    for(let key in data.list){
      for(let i=0;i<data.list[key].airlines.length;i++){
        arr.push(  {
          "fromName": data.list[key].airlines[i].fromName,
          "toName": data.list[key].airlines[i].toName,
          "coords": [data.list[key].airlines[i].coords.fromName, data.list[key].airlines[i].coords.toName]
        })
      }
    }
    portalData=arr;
      console.log(portalData)
  }
});

export default portalData;